package com.hgyc.mom.mes.entity;

import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*;

import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.annotation.DictColumn;
import com.hgyc.mom.core.annotation.TableDict;
import com.hgyc.mom.core.mybatis.EQ;
import com.hgyc.mom.core.mybatis.Like;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <p>
 * 文档管理
 * </p>
 *
 * @author fwj
 * @since 2025-06-18
 */
@Data
@TableName("sop_document")
@Schema(name="文档管理对象", description="文档管理对象")
public class SopDocument implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "文档ID")
    private Long id;

    @Excel(name = "文档集ID")
    @EQ
    @Schema(description = "文档集ID")
    private Long manageId;

    @Excel(name = "附件ID")
    @Schema(description = "附件ID")
    @TableDict(table = "sop_attachment", key = "id", columns = {
            @DictColumn(name="file_name" , alias = "fileName"),
            @DictColumn(name="file_type", alias = "fileType"),
            @DictColumn(name="file_size", alias = "fileSize")
    })
    private Long attachmentId;

    @Excel(name = "开始页码")
    @Schema(description = "开始页码")
    private Integer startIndex;

    @Excel(name = "结束页码")
    @Schema(description = "结束页码")
    private Integer endIndex;

    @Excel(name = "备注")
    @Schema(description = "备注")
    private String remark;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新者")
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}
